home *** CD-ROM | disk | FTP | other *** search
- package com.ibm.xml.parser;
-
- import org.w3c.dom.DOMException;
- import org.w3c.dom.DocumentFragment;
- import org.w3c.dom.Node;
-
- public class TXDocumentFragment extends Parent implements DocumentFragment {
- static final long serialVersionUID = 6444589823666718310L;
-
- public Object clone() {
- return this.cloneNode(true);
- }
-
- public synchronized Node cloneNode(boolean var1) {
- ((Child)this).checkFactory();
- TXDocumentFragment var2 = (TXDocumentFragment)((Child)this).getOwnerDocument().createDocumentFragment();
- ((Child)var2).setFactory(((Child)this).getFactory());
- if (var1) {
- var2.children.ensureCapacity(super.children.getLength());
-
- for(int var3 = 0; var3 < super.children.getLength(); ++var3) {
- ((Parent)var2).appendChild(super.children.item(var3).cloneNode(true));
- }
- }
-
- return var2;
- }
-
- public synchronized boolean equals(Node var1, boolean var2) {
- if (!(var1 instanceof TXDocumentFragment)) {
- return false;
- } else {
- TXDocumentFragment var3 = (TXDocumentFragment)var1;
- return !var2 || var3.children.equals(super.children, var2);
- }
- }
-
- public short getNodeType() {
- return 11;
- }
-
- public String getNodeName() {
- return "#document-fragment";
- }
-
- public void acceptPre(Visitor var1) throws Exception {
- var1.visitDocumentFragmentPre(this);
- }
-
- public void acceptPost(Visitor var1) throws Exception {
- var1.visitDocumentFragmentPost(this);
- }
-
- protected void checkChildType(Node var1) throws DOMException {
- switch (var1.getNodeType()) {
- case 1:
- case 3:
- case 4:
- case 5:
- case 7:
- case 8:
- case 23:
- return;
- default:
- throw new TXDOMException((short)3, "Specified node type (" + var1.getNodeType() + ") can't be a child of DocumentFragment.");
- }
- }
- }
-